<form class="form-horizontal" method="post" id="editForm" action="{:request()->url()}">
                    <div class="form-group">
                        <label class="col-sm-2">产品名称：</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="pname" placeholder="">
                        </div>
                        <label class="col-sm-2">产品规格：</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="spec" placeholder="">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2">供应商：</label>
                        <div class="col-sm-4">
                            <select name="gid" class="mySelect" style="width: 100%">
                                <option value=""></option>
                                <?= \app\member\model\StockSet::option_gys()?>
                            </select>
                        </div>
                        <label class="col-sm-2">产品分类：</label>
                        <div class="col-sm-4">
                            <select name="fid" class="mySelect" style="width: 100%">
                                <option value=""></option>
                                <?= \app\member\model\StockSet::option_fl()?>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2">采购价：</label>
                        <div class="col-sm-4">
                            <input type="number" class="form-control" name="buying_price" placeholder="">
                        </div>
                        <label class="col-sm-2">销售价：</label>
                        <div class="col-sm-4">
                            <input type="number" class="form-control" name="selling_price" placeholder="">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2">产品编码：</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="sn" placeholder="">
                        </div>
                        <label class="col-sm-2">条形码：</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="bar_code" placeholder="">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2">单位：</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="unit" placeholder="">
                        </div>
                        <label class="col-sm-2">安全线：</label>
                        <div class="col-sm-4">
                            <input type="number" class="form-control" name="safeline" placeholder="">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2">产品图：</label>
                        <div class="col-sm-10">
                            <{tmdTag:upimgmember name="photo"/}>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2">状态：</label>
                        <div class="col-sm-4">
                            <{tmdTag:select name="status" optname="product_status" /}>
                        </div>
                        <label class="col-sm-2">排序：</label>
                        <div class="col-sm-4">
                            <input type="number" class="form-control" name="listorder" placeholder="">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2">备注：</label>
                        <div class="col-sm-10">
                            <textarea name="remark" rows="5" style="width:100%" class="form-control" placeholder=""></textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <input type="hidden" class="form-control" name="id">
                            <button type="submit" class="btn btn-primary">保存</button>
                        </div>
                    </div>

                </form>


<script>
    $('#editForm').myForm();
    
    // <?php if ($list) { ?> //
    var list = <?=json_encode($list, JSON_UNESCAPED_UNICODE)?>;
    $('#editForm').myFormData(list);
    // <?php } ?> //

</script>
<script>pageInit();</script>